FFMPEG = /home/town/ffmpeg_build
CC = gcc
CFLAGS = -g -I$(FFMPEG)/include 
LDFLAGS = -L$(FFMPEG)/lib/ -lswscale -lswresample -lavformat -lavdevice -lavcodec -lavutil -lavfilter

TARGETS = capture_jpeg

all : $(TARGETS)

$(TARGETS):$(TARGETS).c
	@mkdir -p build/
	$(CC) $(CFLAGS) $^ -o build/$@ $(LDFLAGS) -std=c11

.PHONY : clean
clean:
	-@rm -rf build/